package org.jprogger.myworld.api.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.jprogger.myworld.api.ApiServiceInvocationException;
import org.jprogger.myworld.api.app.AppContext;
import org.jprogger.myworld.api.response.ApiResponse;
import org.jprogger.myworld.api.response.handler.NotificationSendApiResponseHandler;

public class NotificationService extends BaseApiService {

	public NotificationService(AppContext context) {
		super(context);
	}
	
	public ApiResponse<List<Integer>> publishNotification(String[] userIds, String text)
			throws ApiServiceInvocationException {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("uids", userIds);
		params.put("text", text);
		params.put("method", "notifications.send");
		return apiCall(params, new NotificationSendApiResponseHandler());
	}

}
